package com.bmps.springcloud.insuredmicroservice.model.trail.request;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 10:59
 **/
public class TrailInsurantModel implements Serializable {

    private int insSeq;

    private String name;

    private String sex;

    @JSONField(format = "yyyy-MM-dd")
    private Date birthday;
    
    private String nativePlace;

    private String idType;

    private String idNo;

    private String occupationType;

    private String occupationCode;

    private String relToApp;

    private String socialInsuFlag;
    
    public int getInsSeq() {
        return insSeq;
    }

    public void setInsSeq(int insSeq) {
        this.insSeq = insSeq;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getNativePlace() {
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace;
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getOccupationType() {
        return occupationType;
    }

    public void setOccupationType(String occupationType) {
        this.occupationType = occupationType;
    }

    public String getOccupationCode() {
        return occupationCode;
    }

    public void setOccupationCode(String occupationCode) {
        this.occupationCode = occupationCode;
    }

    public String getRelToApp() {
        return relToApp;
    }

    public void setRelToApp(String relToApp) {
        this.relToApp = relToApp;
    }

    public String getSocialInsuFlag() {
        return socialInsuFlag;
    }

    public void setSocialInsuFlag(String socialInsuFlag) {
        this.socialInsuFlag = socialInsuFlag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()){
            return false;
        }

        TrailInsurantModel that = (TrailInsurantModel) o;

        return new EqualsBuilder()
                .append(insSeq, that.insSeq)
                .append(name, that.name)
                .append(sex, that.sex)
                .append(birthday, that.birthday)
                .append(nativePlace, that.nativePlace)
                .append(idType, that.idType)
                .append(idNo, that.idNo)
                .append(occupationType, that.occupationType)
                .append(occupationCode, that.occupationCode)
                .append(relToApp, that.relToApp)
                .append(socialInsuFlag, that.socialInsuFlag)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(insSeq)
                .append(name)
                .append(sex)
                .append(birthday)
                .append(nativePlace)
                .append(idType)
                .append(idNo)
                .append(occupationType)
                .append(occupationCode)
                .append(relToApp)
                .append(socialInsuFlag)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailInsurantModel{" +
                "insSeq=" + insSeq +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", nativePlace='" + nativePlace + '\'' +
                ", idType='" + idType + '\'' +
                ", idNo='" + idNo + '\'' +
                ", occupationType='" + occupationType + '\'' +
                ", occupationCode='" + occupationCode + '\'' +
                ", relToApp='" + relToApp + '\'' +
                ", socialInsuFlag='" + socialInsuFlag + '\'' +
                '}';
    }
}
